# 执行Dockerfile构建镜像
if docker build --no-cache -t script-framework:v1 -f /opt/framework/script-framework/Dockerfile .; then
    echo "Docker镜像已成功构建."
else
    echo "构建Docker镜像失败。退出..."
    exit 1
fi
echo "....................启动容器.................."
# 启动容器
docker run -dti  \
        -p 9001:9001 \
        --name script \
        -v /opt/framework/logs:/opt/framework/script-framework/logs:Z \
        --privileged=true \
        script-framework:v1